package club.zhaoliang.study.index;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import club.zhaoliang.study.HookActivity;
import club.zhaoliang.study.R;
import club.zhaoliang.study.blockcanary.BlockCanaryActivity;
import club.zhaoliang.study.leakcanary.LeakCanaryActivity;
import club.zhaoliang.study.webservice.AndServerActivity;
import club.zhaoliang.study.xcrash.XcrashActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //LeakCanary 内存泄漏
        findViewById(R.id.tvLeakCanary).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, LeakCanaryActivity.class));
            }
        });

        //crash
        findViewById(R.id.tvXcrash).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, XcrashActivity.class));
            }
        });

        //BlockCanary 卡顿监控
        findViewById(R.id.tvBlockCanary).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, BlockCanaryActivity.class));
            }
        });

        //AndServer web service
        findViewById(R.id.tvAndServer).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, AndServerActivity.class));
            }
        });

        //tvHook
        findViewById(R.id.tvHook).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, HookActivity.class));
            }
        });


    }


}
